/*
 * Copyright 2018 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.eduhzy.ttw.commonsdk.core;

/**
 * ================================================
 * CommonSDK 的 Constants 可以定义公用的常量, 比如关于业务的常量或者正则表达式, 每个组件的 Constants 可以定义组件自己的私有常量
 * <p>
 * Created by JessYan on 30/03/2018 17:32
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public interface Constants {
    String AWARD[] = {"未获奖", "一等奖", "二等奖", "三等奖", "四等奖", "五等奖", "六等奖", "七等奖", "八等奖", "九等奖"};
    String[] LIVE_TITLES = new String[]{
            "全部", "数学", "语文", "应用示范", "专家讲座"
    };
    String[] LIVE_IDS = new String[]{
            "", "279", "277", "281", "282"
    };
    String COMPLETE = "完成";
    String JPushAlias = "eduhzy_tangt_";
    String HASCLAZZ = "hasClazz";
    String HASSCHOOL = "hasSchool";
    String NOTICE_DETAIL = "通知详情";
    String WORK_DETAIL = "作业详情";
    String PUBLISH_WORK = "发布作业";
    String[] LEVEL_TXT = {"差", "较差", "一般", "良好", "优秀"};
    String UMENG_APPKEY = "5c32cb51b465f5d614000e6e";

    /**
     * 文件格式 0：通用类，1，视频类，2：文档类，3：图片类，4：音频类5压缩文件(YXS：6我的资源 7我的备课 )
     */
    interface FILETYPE {
        int COMMON = 0;
        int VIDEO = 1;
        int DOCUMENT = 2;
        int PICTURE = 3;
        int AUDIO = 4;
        int ZIP = 5;
        int RESOURCE = 6;
        int LESSON = 7;
    }

    //支付宝支付相关
    String ALIPAY_APPID = "";
    boolean isRSA2 = true;
    String ALIPAY_RSA2_PRIVATE = "";
    //微信支付
    String WX_APP_ID = "wxc99d5e7664019645"; //微信分配的APP_ID
    String WX_PARTNER_ID = "15415614"; //微信分配的 PARTNER_ID (商户ID)
    String WX_PRIVATE_KEY = "1fdsafsda"; //微信分配的 PRIVATE_KEY (私钥)
    String PREPAY_ID = "fdsafsadf"; //订单ID (唯一)

    //title
    String LOGIN = "登录";
    String SETTING = "设置";
    String PHONE_VERIFY = "手机验证";
    String FIND_PASSWORD = "找回密码";
    String RESET_PASSWORD = "重设密码";
    String CHANGE_PASSWORD = "修改密码";
    String PERSON_INFO = "个人信息";
    String MINECLASS = "我的班级";
    String CREATE_CLASS = "创建班级";
    String CHOOSE_CLASS = "选择年级";
    String MODIFY_NAME = "修改姓名";
    String CLASS_CREATE_SUCCESS = "班级创建成功";
    String CLASS_QRCODE_TIP = "扫一扫上面的二维码，加入班级";
    String PERSON_QRCODE_TIP = "扫一扫上面的二维码，加我为好友";
    String CLASS_QRCODE = "班级二维码";
    String ID = "id";
    String CLASS_DETAILS = "班级详情";
    String CLASST_TEACHER = "班级老师";
    String CHOOSE_SUBJECT = "选择任教学科";
    String TRANSFER_CLASS = "班级管理转让";
    String UPDATE_CLASS = "班级名称修改";
    String CLASST_STUDENT = "班级学生";
    String SCANER_QRCODE = "扫一扫";
    String JOIN_CLASS = "加入班级";
    String CHOOSE_PROVINCE = "选择省份";
    String CHOOSE_CITY = "选择市";
    String CHOOSE_DISTRICT = "选择区";
    String CHOOSE_SCHOOL = "选择学校";
    String MODIFY_PHONE = "修改手机";
    String MODIFY_GENDER = "修改性别";
    String QR_CODE_CARD = "二维码名片";
    String ADD_FRIEND = "添加朋友";
    String CONTACT_DETAILS = "详细资料";
    String COURSE_DETAILS = "课程详情";
    String MYCOURSE = "我的课程";
    String COURSE_PLAY = "课程播放";
    String COMMENT = "评价";
    String MINEORDER = "我的订单";
    String ORDERPAY = "订单结算";
    String SIGNUP = "报名信息";
    String CHOOSEGROUP = "选择分组";
    String MY_WORKS = "我的作品";

    String ROUTER_IMG = "router_img";
    String ROUTER_DATA = "router_data";
    String PARCELABLE_DATA = "parcelable_data";
    String PARCELABLE_LIST = "parcelable_list";
    String ROUTER_BOOLEAN = "router_data_boolean";
    String ROUTER_BOOLEAN2 = "router_data_boolean2";
    String ROUTER_STRING = "router_data_string";
    String ROUTER_INTEGER = "router_data_integer";
    int LOGIN_NORMAL = 3;
    int LOGIN_THIRD_QQ = 4;
    int LOGIN_THIRD = 1000001;
    int LOGIN_THIRD_WX = 5;

    //电话号码正则
    String PHONE_REGULAR = "^1[3-9]\\d{9}$";
    String TOKEN = "login_token";
    String PASSWORD = "password";
    String USERNAME = "username";
    String USERID = "authUserId";
    String TIP_SCHOOL_OR_CLASS = "tip_school_or_class";
    //客户端类型 2：教师 4：家长 5：园长
    String TEACHER = "2";
    String PATRIARCH = "4";
    String LEADER = "5";
    /**
     * 1,找回密码用验证码，2，实名认证，3用户注册
     */
    String TEMPLATE = "template";
    String TYPE_REGISTER = "3";
    String TYPE_FIND_PASSWORD = "1";
    String TYPE_REAL_NAME_AUTH = "2";
    String LOGIN_TYPE = "login_type";

    String USERNICKNAME = "userNickName";
    String DEVICEID = "deviceId";
    String MESSAGECODE = "message_code";
    String CLIENT_TYPE = "2";//用户类型3学生，2教师，4家长;
    String OPENID = "openid";
    String GROUPID = "groupId";

    String uploadAppId = "1";
    String uploadAppKey = "DE5E36597A1";

    int REQUEST_CROP_PHOTO = 1002;
    int REQUEST_CODE_CHOOSE = 1003;
    String CLIP_TYPE = "intent.ext.clip.type";
    String TEMPAVATAR = "tempAvatar";
    String GENERATE_CODE = "intent.extra.generate.code";
    String QR_CODE_TYPE = "qr_code_type";


    interface QRCODE {
        int Person = 0;
        int Clazz = 1;
        int School = 2;
    }

    interface HOME_ITEM_TYPE {
        int ITEM_HEAD = 1;
        int ITEM_HOME = 2;
    }

    interface STUDENT_TYPE {
        int Normal = 1;
        int Teacher = 2;
        int Student = 3;
        int Parent = 4;
    }

    interface QRCODE_PREFIX_TYPE {
        String CLASS = "class_";
        String USER = "user_";
    }

    class ChooseAreaTitle {

        public static String getTitle(int type) {
            String title = "";
            switch (type) {
                case 0:
                    title = CHOOSE_PROVINCE;
                    break;
                case 1:
                    title = CHOOSE_CITY;
                    break;
                case 2:
                    title = CHOOSE_DISTRICT;
                    break;
                default:
                    break;
            }
            return title;
        }
    }
}
